package com.wu.llpsw.blocks;

//import com.wu.llpsw.blocks.BlockHerb.yuanmi_herb;
import net.minecraft.client.renderer.ItemBlockRenderTypes;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.CropBlock;
import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.material.Material;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;

public class ModBlock {
    //注册机
    public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS,
            "wu");
    public static RegistryObject<Block> YUANMI = BLOCKS.register("yuanmi_block",
            ()-> new CropBlock(BlockBehaviour.Properties.of(Material.PLANT).noCollission().randomTicks().instabreak().sound(SoundType.CROP)));

    public static RegistryObject<Block> YUANLINGGUO = BLOCKS.register("yuanlingguo_block",
            ()-> new CropBlock(BlockBehaviour.Properties.of(Material.PLANT).noCollission().randomTicks().instabreak().sound(SoundType.CROP)));


    public static RegistryObject<Block> DIAOLINGSAN = BLOCKS.register("diaolingsan_block",
            ()-> new CropBlock(BlockBehaviour.Properties.of(Material.PLANT).noCollission().randomTicks().instabreak().sound(SoundType.CROP)));

    public static RegistryObject<Block> JIUXIANCAO = BLOCKS.register("jiuxiancao_block",
            ()-> new CropBlock(BlockBehaviour.Properties.of(Material.PLANT).noCollission().randomTicks().instabreak().sound(SoundType.CROP)));
    public static RegistryObject<Block> YUANGANGGUO = BLOCKS.register("yuangangguo_block",
            ()-> new CropBlock(BlockBehaviour.Properties.of(Material.PLANT).noCollission().randomTicks().instabreak().sound(SoundType.CROP)));

    public static void zhuce(){
        ItemBlockRenderTypes.setRenderLayer(ModBlock.YUANMI.get(), RenderType.cutout());
        ItemBlockRenderTypes.setRenderLayer(ModBlock.YUANLINGGUO.get(), RenderType.cutout());
        ItemBlockRenderTypes.setRenderLayer(ModBlock.DIAOLINGSAN.get(), RenderType.cutout());
        ItemBlockRenderTypes.setRenderLayer(ModBlock.JIUXIANCAO.get(), RenderType.cutout());
        ItemBlockRenderTypes.setRenderLayer(ModBlock.YUANGANGGUO.get(), RenderType.cutout());
    }
}
